﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace Xwork.SEO.WebSite.Models
{
    public class UserInfoModel
    {
        [Display(Name = "公司名称")]
        [Required]
        [MaxLength(40)]
        public string Company { get; set; }

        [Display(Name = "联系人")]
        [Required]
        [MaxLength(20)]
        public string Linkman { get; set; }

        [Display(Name = "固定电话")]
        [Required]
        [MaxLength(20)]
        [RegularExpression("^[0-9\\-()（）]{7,18}$", ErrorMessage = "格式不正确")]
        public string Phone { get; set; }

        [Display(Name = "所属地区")]
        [Required]
        public string Area { get; set; }

        [Display(Name = "地址")]
        [Required]
        [MaxLength(40)]
        public string Address { get; set; }

        [Display(Name = "手机号码")]
        [Required]
        [RegularExpression("^0?(13|15|18)[0-9]{9}$", ErrorMessage = "手机号格式不正确")]
        public string Mobile { get; set; }

        [Display(Name = "传真")]
        [Required]
        [MaxLength(20)]
        public string Fax { get; set; }

        [Display(Name = "常用邮箱")]
        [Required]
        [MaxLength(30)]
        [RegularExpression("^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$", ErrorMessage = "电子邮箱格式不正确")]
        public string UserEmail { get; set; }

        [Display(Name = "营业执照")]
        public string Pic { get; set; }

    }
}